/**
 * @Author luof
 * @Date 2024/4/28 10:59
 * @Description:
 */
import {createRouter, createWebHashHistory} from "vue-router";


const router = createRouter({
    history: createWebHashHistory(),
    routes: [
        {
            path: '/',
            redirect: '/login'
        },
        {
            name: 'login',
            path: '/login',
            component: () => import("../views/Login/index.vue")
        },
        {
            name: 'admin',
            path: '/admin',
            component: () => import("../views/AdminHome/index.vue"),
            children: [
                {
                    name: 'index',
                    path: 'index',
                    meta: {title: "后台首页"},
                    component: () => import("../views/AdminHome/AdminIndex/index.vue"),
                },
                {
                    name: 'web',
                    path: 'web',
                    meta: {title: "网站配置"},
                    component: () => import("../views/AdminHome/AdminWeb/index.vue"),
                },
                {
                    name: 'userlist',
                    path: 'userlist',
                    meta: {title: "用户管理"},
                    component: () => import("../views/AdminHome/AdminUserList/index.vue"),
                },
                {
                    name: 'sign',
                    path: 'sign',
                    meta: {title: "签名管理"},
                    component: () => import("../views/AdminHome/AdminSign/index.vue"),
                },
                {
                    name: 'meallist',
                    path: 'meallist',
                    meta: {title: "套餐管理"},
                    component: () => import("../views/AdminHome/AdminMealList/index.vue"),
                },
                {
                    name: 'paylist',
                    path: 'paylist',
                    meta: {title: "账单记录"},
                    component: () => import("../views/AdminHome/AdminPayList/index.vue"),
                },
                {
                    name: 'smslist',
                    path: 'smslist',
                    meta: {title: "短信记录"},
                    component: () => import("../views/AdminHome/AdminSmsList/index.vue"),
                },
            ]
        }
    ]
})

export default router